﻿@model CreateReferenceFieldDefinitionModel

@{
    ViewBag.Title = "Edit";
}

<div class="folder">
    <h2 class="folder-heading">@Loc("Create new reference form field")</h2>

    @using (Html.BeginForm())
    {
        <div class="editor-item w400">
            <div class="editor-label">
                @Html.LabelFor(m => m.Name)
            </div>
            <div class="editor-field">
                @Html.EditorFor(m => m.Name)
                @Html.ValidationMessageFor(m => m.Name)
            </div>
        </div>
        <div class="clear"></div>
        
        <div class="editor-item">
            <div class="editor-label">
                @Html.EditorFor(m => m.Required)
                @Html.LabelFor(m => m.Required)
                @Html.ValidationMessageFor(m => m.Required)
            </div>
        </div>
        <div class="clear"></div>
        
        <div class="editor-item w200">
            <div class="editor-label">
                @Html.LabelFor(m => m.TargetFieldDefinitionID)
            </div>
            <div class="editor-field">
                @Html.DropDownListFor(m => m.TargetFieldDefinitionID, Model.GetFields())
                @Html.ValidationMessageFor(m => m.TargetFieldDefinitionID)
            </div>
        </div>
        <div class="clear"></div>
        
        @Html.HiddenFor(m => m.FormDefinitionID)
        <input type="submit" name="save" value="@Loc("Save field")" />
    }
</div>
